CONTENTS | INDEX | PREV | NEXT
USING REGISTERIZED ARGUMENTS
Using registerized arguments will make your code smaller and faster,
but there are some restrictions and various other things you must be
sure to do before you can use the feature reliably.
RESTRICTIONS WITH 1.3
No standard prototype headers exist for the Amiga includes under
1.3. Since REGARGS depends on the programmer using the same
prototypes as were used to generate the regargs library, no
regargs library (would be amigasr.lib) exists for 1.3
Under 2.0, the prototypes do exist in the directory
CLIB/#?_protos.h , and a 2.0 version of amiga.lib does
exist (AMIGASR20.LIB).
Thus, under 1.3 you cannot use REGARGS for system calls, though
you can use it for all the functions within your program. To
prevent DICE from attempting to make regargs system calls (if
this occurs you will get undefined symbol errors in link showing
symbols that begin with an '@'), you must either not prototype
the arguments to the system calls, or prototype them with
__stkargs. Example:
void *AllocMem(); /* OK */
__stkargs void *AllocMem(long, long) /* OK */
void *AllocMem(long, long) /* WRONG */
The second method is the one of choice (using __stkargs) because it
allows you to do strict prototype checking (-proto option to DCC)
and mix non-registered amiga.lib calls with registered calls
RESTRICTIONS IN AMIGASR20.LIB, (GENERAL)
The registerized version of amiga.lib does not contain all
amiga.lib functions. Of major import: CreateTask() and
DeleteTask() are missing. The single precision FFP routines
do not exist either.